-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor create2 #87
Refactor create2 #87
Conversation
Interesting !
|
Not sure but this should be less than 20k gas, the cost of a very cold SSTORE. This may not be the most important benefit of this PR though: making it possible to have deterministic addresses onchain, and being able to have a nice error message should bring the most benefit Agree with point 2, until we get proper support in solidity. Also agree with point 3, this is probably too late. But this was more meant as a demonstration of what we could do in the future than an actual PR we should merge right now |
|
No, because the PR is unusable as of now (see point 2 of the todo list). I will close it, as it was more something to have in mind for the future than anything else |
This PRs makes so the constructor of the PreLiquidation contract does not take any argument, and instead fetches them for the sender (which is expected to be the factory). To avoid collisions, the salt is used, by simply setting it to the hash of the parameters.
The purpose is to:
isPreLiquidation
. Instead it uses the computation of the expected address of the pre-liquidation contract;Todo:
Not optimized yet
:isPreLiquidation